<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/page/share/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>项目管理系统 by www.mycodes.net</title>

<link href="<%=request.getContextPath()%>/page/drug/css/drugStyle.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath()%>/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/page/drug/js/drugList.js"></script>
<script type="text/JavaScript">

</script>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" />
</head>
<SCRIPT language=JavaScript>

function selectAll(){
	var obj = document.fom.elements;
	for (var i=0;i<obj.length;i++){
		if (obj[i].name == "delid"){
			obj[i].checked = true;
		}
	}
}

function unselectAll(){
	var obj = document.fom.elements;
	for (var i=0;i<obj.length;i++){
		if (obj[i].name == "delid"){
			if (obj[i].checked==true) obj[i].checked = false;
			else obj[i].checked = true;
		}
	}
}

</SCRIPT>
<body onunload= "window.opener.location.reload();">
<%
    int totalPageNum = (Integer)session.getAttribute("totalPageNum") ;
    int currentPageNum = (Integer)session.getAttribute("currentPageNum") ;
    
 %>
<form name="fom" id="fom" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  
  <tr>
    <td height="30">      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="62" background="<%=request.getContextPath()%>/images/nav04.gif"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="21"><img src="<%=request.getContextPath()%>/images/ico07.gif" width="20" height="18" /></td>
              <td width="538">筛选查询：
			         药品名<input name="drug_Id" type="text" size="12" id="drug_Name"/>
                    <a href="#" onclick="location.href='<%=request.getContextPath() %>/drugManageAction!findDrug_By_NameOrId.do?drug_Name='+encodeURI(encodeURI(document.getElementById('drug_Name').value))"><input name="search" type="button" class="right-button02" value="查 询" /></a></td>
              <td width="144" align="left"> 
                    <a href="#" onclick="location.href='<%=request.getContextPath() %>/drugManageAction!drugInStorage.do?drug_Id='+encodeURI(encodeURI(document.getElementsByName('delid').value))"><input id="confirm" type="submit" class="right-button07" value="确定"/></a>
             </td>
           </tr>
         </table>
         </td>
       </tr>
    </table>
 </td>
</tr>
  <tr>
    <td><table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          	 <tr>
               <td height="20"><span class="newfont07">选择：<a href="#" class="right-font08" onclick="selectAll();">全选</a>-<a href="#" class="right-font08" onclick="unselectAll();">反选</a></span>
	          </td>
          	 </tr>
              <tr>
                <td height="40" class="font42">
				<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
				 <tr class="CTitle" >
                    	<td height="22" colspan="11" align="center" style="font-size:16px">药品详细列表</td>
                  </tr>
                  <tr bgcolor="#EEEEEE">
				    <td width="6%" align="center" height="10">选择</td>
                    <td width="6%" align="center">药品编号</td>
					<td width="6%" align="center">药品名称</td>
					<td width="6%" align="center">药品简码</td>
                    <td width="6%" align="center">药品类型</td>
					<td width="6%" align="center">药品规格</td>
					<td width="6%" align="center">计量单位</td>
					<td width="6%" align="center">进货单价</td>
					<td width="6%" align="center">出货单价</td>
                    <td width="6%" align="center">库存量</td>
					<td width="6%" align="center">下限量</td>
                  </tr>
                  <c:forEach items="${drugList}" var="drug">
	                  <tr bgcolor="#EEEEEE">
	                     <td width="1%" align="center"><input type="checkbox" name="delid" value="${drug.drug_Id}"/></td>
	                     <td width="4%" align="center">${drug.drug_Id}</td>
	                     <td width="4%" align="center">${drug.drug_Name}</td>
	                     <td width="4%" align="center">${drug.drug_Code}</td>
	                     <td width="4%" align="center">${drug.drug_Type}</td>
	                     <td width="4%" align="center">${drug.drug_Standard}</td>
	                     <td width="4%" align="center">${drug.drug_Unit}</td>
	                     <td width="4%" align="center">${drug.drug_Cost}</td>
	                     <td width="4%" align="center">${drug.drug_Price}</td>
	                     <td width="4%" align="center">${drug.drug_Count}</td>
	                     <td width="4%" align="center">${drug.drug_LowLimited}</td>
	                  </tr>
                  </c:forEach>
                  
            </table></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="6"><img src="<%=request.getContextPath()%>/images/spacer.gif" width="1" height="1" /></td>
        </tr>
        <tr>
          <td height="33"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="right-font08">
              <tr>
                <td width="50%">共 <span class="right-text09"><%=totalPageNum %></span> 页 | 第 <span class="right-text09"><%=currentPageNum %></span> 页</td>
                <td width="49%" align="right">[<a href="drugManageAction!drugList.do?currentPageNum=1" class="right-font08">首页</a> | <a href="drugManageAction!drugList.do?currentPageNum=<%=currentPageNum-1%>" class="right-font08">上一页</a> | <a href="drugManageAction!drugList.do?currentPageNum=<%=currentPageNum+1%>" class="right-font08">下一页</a> | <a href="drugManageAction!drugList.do?currentPageNum=<%=totalPageNum%>" class="right-font08">末页</a>] 转至：</td>
                <td width="1%">
                  <table width="20" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="1%">
                          <input name="textfield3" type="text" class="right-textfield03" size="1" />
                      </td>
                      <td width="87%">
                          <input name="Submit23222" type="submit" class="right-button06" value=" " />
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
